Repository navigation
Conversation
The last start index of each globstar-delimited body section was computed from the non-globstar prefix counts in reverse order. When sections have different lengths, the bound is too tight, so paths such as `a/b/c/d/e` failed to match `**/a/b/c/**/d/**`. This affected `path.matchesGlob()` and `exclude` patterns in `fs.glob()`. Compute the bound from the number of non-globstar parts in the section and every section after it. Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
|
Review requested:
|
Is this a breaking change, since the previous implementation suffered the same issue? Or just a bug fix |
|
I don't have a strong opinion, but this can't be backported anyway right? I think no active release has the C++ port? And previous releases (24, 26) have the bug from minimatch directly |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #66738 +/- ##
=======================================
Coverage 90.48% 90.49%
=======================================
Files 791 791
Lines 277204 277225 +21
Branches 53311 53315 +4
=======================================
+ Hits 250841 250861 +20
+ Misses 16760 16753 -7
- Partials 9603 9611 +8
🚀 New features to boost your workflow:
|
|
Thanks for spotting this! Reported upstream in isaacs/minimatch#329, it's a regression since 10.2.3. |
|
Should I add do not land labels for these? Since the C++ wasn't back-ported either? |
If it can't or shouldn't land, yes you should add the dont-land labels |
The last start index of each globstar-delimited body section was computed from the non-globstar prefix counts in reverse order. When sections have different lengths, the bound is too tight, so paths such as
a/b/c/d/efailed to match**/a/b/c/**/d/**. This affectedpath.matchesGlob()andexcludepatterns infs.glob()Compute the bound from the number of non-globstar parts in the section and every section after it
FYI minimatch has the bug too